// {"children":[],"courseId":13,"id":294,"name":"完整项目","order":145000,"parentChapterId":293,"userControlSetTop":false,"visible":0}

class Category {
  int courseId;
  int id;
  String name;
  int order;
  int parentChapterId;
  bool userControlSetTop;
  int visible;
  List<Category> children=[];

  Category.fromMap(Map<String, dynamic> map) {
    this.name = map["name"];
    this.id = map["id"];
    // this.parentChapterId = map["parentChapterId"];
    // this.userControlSetTop = map["userControlSetTop"];
    // this.visible = map["visible"];
    this.children = []
      ..addAll((map['children'] as List ?? []).map((o) => Category.fromMap(o)));
  }
}
